<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>首页</h1>
<div th:if="${session.loginuser==null}">
<a th:href="@{/tologin}">登录</a>
</div>
<div th:if="${session.loginuser!=null}">
    <a th:href="@{/quit}">退出</a>
</div>
<p th:text="${msg}"></p><br/>
<div shiro:hasPermission="add">
    添加权限
    <a th:href="@{/user/add}">add</a>
</div>
<div shiro:hasPermission="update">
    修改权限
    <a th:href="@{/user/update}">update</a>
</div>

</body>
</html>